package com.quiz.bis.service;

import com.quiz.bis.domain.bo.AppealHandleBo;
import com.quiz.bis.domain.bo.ManualCorrectBo;
import com.quiz.bis.domain.bo.ScoreQueryBo;
import com.quiz.bis.domain.model.ExamQuestionAnswers;
import com.quiz.bis.domain.vo.*;
import com.quiz.common.core.domain.R;
import com.quiz.common.mybatis.core.page.PageQuery;
import com.quiz.common.mybatis.core.page.TableDataInfo;

import java.util.List;

/**
 * 成绩管理服务接口
 */
public interface IScoreService {
    TableDataInfo<ExamScoreSummaryVo> pageExamScoreList(ScoreQueryBo query, PageQuery pageQuery);

    ExamScoreSummaryVo getExamSummary(Long examId);

    List<QuestionStatVo> getQuestionStats(Long examId);

    TableDataInfo<StudentScoreVo> pageStudentScores(Long examId, PageQuery pageQuery, String searchKey);

    StudentExamScoreDetailVo getStudentExamDetail(Long recordId);

    R<Void> manualCorrect(ManualCorrectBo correctBo);

    List<ManualCorrectQuestionVo> getManualCorrectQuestions(Long examId);

    List<ManualCorrectStudentVo> getManualCorrectStudents(Long examId);

    R<Void> publishScore(Long examId);

    R<Void> handleAppeal(AppealHandleBo handleBo);

    List<AppealVo> getAppealList(Long examId);

    /**
     * 获取题目详情
     */
    QuestionDetailVo getQuestionDetail(Long questionId);

    /**
     * 获取学生答案
     * @param questionId 按题目批改时使用
     * @param recordId 按学生批改时使用
     * @param examId 按题目批改时需要
     */
    StudentAnswerVo getStudentAnswer(Long questionId, Long recordId, Long examId);


    ExamStatisticsPerStuVo getStudentExamStatistics(Long recordId);

    ExamQuestionAnswers getStudentAnswerRecord(Long questionAnswerId);
}